import axios from "axios";

export interface WukongApiReq{
    style:string
    desc:string
}
export interface WukongApiRes{
    code:number
    msg:string
    data:{
        pictures:Object
    }
}
//const EndPoint = "https://xihe.mindspore.cn/api/v1/bigmodel/api/wukong"
const token = "eb9731ece55796b98c0d3e5164320d4d3271a87614e27708e2e18a3a9b871d635cfec3fedecc1d1b3f67c3c20e5481d82e"

export async function wukongapi(req:WukongApiReq):Promise<WukongApiRes>{
    let res = await axios.post("/wukong",req,{
        headers:{
            token,
            "Content-Type":"application/json",
            "Access-Control-Allow-Origin":"*"
        }
    })
    return res.data as WukongApiRes
}
